package values.avatar
{
import core.Language;

/**
 * AvatarEquipPositionValue
 * @author jliang
 *
 */
public class AvatarEquipPositionValue
{
	[Data(type="field", mapping="@key")]
	public var key:String;
	
	[Data(type="field", mapping="@name")]
	public var baseNameKey:String;
	
	public function get name():String
	{
		return Language.getText(baseNameKey);
	}
	
	[Data(type="field", mapping="@desc")]
	public var baseDescKey:String;
	
	public function get desc():String
	{
		return Language.getText(baseDescKey);
	}
	
	[Data(type="field", mapping="@support", method="stringToArray")]
	public var supportEquipTypes:Array;
	
	public function canSupportEquip(equipType:String):Boolean
	{
		for each (var type:String in supportEquipTypes)
		{
			if (type == equipType) return true;
		}
		return false;
	}
}
}



